---
import Default from '../../layouts/Default.astro';
import Thread from '../../components/Thread.svelte'
import '../../styles/thread.css'
import '../../styles/blackbox.css?'
import type Thread from '../../models/Thread';
import { api } from '../../lib/api.ts';
import { processThreadIn } from '../../lib/thread'
const { board } = Astro.params;
const data = await api('get', `board/${board}`);
if(data.status === 404) return Astro.redirect('/404');
const threads: Thread[] = await data.json();
for(let thread of threads)
await processThreadIn(board, thread);
---
{threads.map((thread) => (
))}